package com.xiegang.orderservice.controller;

import com.xiegang.internalcommon.dto.ResponseResult;
import com.xiegang.internalcommon.request.OrderRequest;
import com.xiegang.orderservice.service.OrderInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author xieGang
 * @description
 * @date 2023/4/7 16:41
 **/
@RestController
@RequestMapping("/test")
public class OrderController {
    @Autowired
    private OrderInfoService orderInfoService;

    @PostMapping("/add")
    public ResponseResult add(@RequestBody OrderRequest orderRequest){
        return orderInfoService.add(orderRequest);
    }
    @PostMapping("/getName")
    public ResponseResult getName(){
        return ResponseResult.success("张三");
    }


}
